home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10070 < prev    next >
Encoding:
Text File  |  1996-08-05  |  6.0 KB  |  139 lines

  1. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  2. Path: netcom.com!adaworks
  3. From: adaworks@netcom.com (AdaWorks)
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Message-ID: <adaworksDntn85.50y@netcom.com>
  6. Followup-To: comp.lang.ada,comp.lang.c,comp.lang.c++
  7. Organization: AdaWorks Software Engineering, Palo Alto, CA
  8. X-Newsreader: TIN [version 1.2 PL1]
  9. References: <JSA.96Feb16135027@organon.com>
  10.             <4h8r0v$1c4i@saba.info.ucla.edu> 
  11.             <4hbj2b$cnt@sun152.spd.dsccc.com> 
  12.             <adaworksDnrqsE.LpC@netcom.com>
  13.             <4hhred$1rn@sun152.spd.dsccc.com>
  14. Date: Wed, 6 Mar 1996 01:09:40 GMT
  15. Sender: adaworks@netcom19.netcom.com
  16.  
  17. Kevin Cline (kcline@sun152.spd.dsccc.com) wrote:
  18.  
  19. Kevin,
  20.  
  21. First, thank you for this impressive enumeration of the difficulties
  22. you experienced. I realize, after re-reading my own posting, that it
  23. sounded a tad arrogant.  My apologies.
  24.  
  25. Neither I, nor anyone else, can really second-guess
  26. your findings with regard to the issues encountered on your project.
  27. I shall comment, briefly on some of them. Perhaps some of my colleagues
  28. will comment on others.
  29.  
  30. : Well, I will now enumerate the difficulties I had porting an Ada program
  31. : with a Motif user interface from the TeleSoft compiler for Sparc-SunOS to
  32. : the Verdix compiler for MIPS/IRIX circa 1990:
  33.  
  34. : 1. The TeleSoft compiler came with the IEEE Ada-POSIX bindings.
  35. :    The Verdix compiler did not; instead it supported a Verdix-defined
  36. :    API for UNIX services that was radically different.
  37.  
  38.      This was clearly a problem with early Ada implementations. Each
  39.      software publisher chose a different approach to support for these
  40.      bindings.  Although this was an actual Ada language problem, it did
  41.      represent poor coordination on this important problem.
  42.  
  43. : 2. The syntax (pragmas) required to call C code from the two compilers 
  44. :    differed.
  45.  
  46.      Yes, I remember this.  The pragma Interface was defined in way that
  47.      encouraged deviation from the standard as well as the definition of
  48.      entirely new pragmas such as pragma Interface_Name. Fortunately, this
  49.      is corrected in the new Ada 95 standard.
  50.  
  51. : 3. Although both compilers were 'validated', they both failed to compile
  52. :    certain LRM-comformant code, and generated erroneous object code in
  53. :    some other cases.  I concluded that the Ada validation suite
  54. :    was rather incomplete, and actually proved very little about compiler
  55. :    quality.
  56.  
  57.      It sounds like this project used a very early version of an Ada
  58.      compiler.  Things did seem to improve somewhere in the 1989 time-frame.
  59.  
  60. :    
  61. : 4. The debuggers were extremely poor and buggy when compared to dbx.
  62. :    In particular, the user interface to the Verdix debugger was one
  63. :    of the most bizarre I have ever seen.
  64.  
  65.      Yes, some of the debuggers were horrible. In addition, some of the
  66.      debuggers for competing languages were just as bad. In the current
  67.      world of software practice, debuggers have gotten better for Ada and
  68.      C, and C++, etc.  It is sometimes tempting to evaluate older 
  69.      software technology in terms of what we have now. 
  70.  
  71.      One amusing point.  I recently heard someone say that Ada was so good
  72.      that the requirement for a debugger was probably superfluous. It was
  73.      difficult to stifle my laughter out of respect for the person making
  74.      this observation.  Of course we need good debuggers -- for all 
  75.      programming languages. I have recently seen some good progress in this
  76.      area for Ada. 
  77.  
  78. : 6. Because Ada-83 did not allow passing procedures as parameters to
  79. :    other procedures, there was no reasonable way to create an
  80. :    API to an event-driven GUI library like MOTIF.
  81.  
  82.      No argument. As you know, this is fixed in Ada 95.
  83.  
  84. : 5. The compilers had two completely different API's for calling 
  85. :    X and MOTIF services.
  86.  
  87.      No argument.
  88.  
  89. : The lack of industry standard Ada bindings to these common OS
  90. : services combined with the high expense and poor quality of the
  91. : available Ada-83 compilers made development a medium-scale portable
  92. : UNIX application in Ada much more expensive and difficult than
  93. : developing the same application in C.
  94.  
  95.      I agree that this is an unresolved issue.  However, serious work
  96.      is in progress.  With a little luck, it will get resolved.  
  97.  
  98. : Perhaps the emergence of GNAT has changed all this, but it is going
  99. : to be hard for Ada to keep up.  To use Ada in my work today, I would 
  100. : require an API to CORBA, Tcl/Tk, and the Solaris real-time facilities
  101. : (itimers, etc.) and a runtime that efficiently mapped Ada tasks to 
  102. : Solaris threads.
  103.  
  104.   It is important to differentiate between GNAT, the compiler technology,
  105.   and Ada 95, the language standard.  Although GNAT is an excellent 
  106.   contribution to the advancement of Ada, other compilers are also in
  107.   the works or already available.  
  108.  
  109.   That being said, I know that some platforms have done a good job of
  110.   mapping Ada tasks to Posix threads.  In particular, the SGI Ada compiler,
  111.   based on GNAT, has an excellent mapping to Ptrheads, which are, in turn,
  112.   mapped to SPROCS, which in turn can be distributed across multiple
  113.   processors.  Also, SGI has mapped Ada to its standard debugging tools so
  114.   Ada debugging on the SGI follows the same pattern as for any other
  115.   language.
  116.  
  117.   I am not certain, but I think Sun still has a little work to do to make
  118.   their Ada 95 development environment as robust as that on the SGI. CORBA
  119.   and other bindings are underway, and we should see a little less
  120.   confusion on this under the new Ada standard. 
  121.  
  122.   After all of this, however, I stand by part of my earlier assertion that
  123.   there were ways of improving the portability of Ada software, even under
  124.   Ada 83. I know it took a long time and a lot of mistakes for many of us
  125.   to figure out how to improve portability, so it wasn't always easy. 
  126.   Even so, your list of real-life difficulties is not trivial.  
  127.  
  128.   Richard Riehle 
  129.   adaworks@netcom.com
  130. -- 
  131.  
  132. richard@adaworks.com
  133. AdaWorks Software Engineering
  134. Suite 27
  135. 2555 Park Boulevard
  136. Palo Alto, CA 94306
  137. (415) 328-1815
  138. FAX  328-1112
  139.